<extend name="Public/base" />

<block name="body">
<style type="text/css">
/*-------- 下拉菜单 --------------*/
.dropMenu{position:absolute;top:0;visibility:hidden;margin-top:-2px; border-top:0;background-color:#eee;padding:4px;width:260px; }
.dropMenu span{float:left; padding-top:10px;}
.dropMenu a:hover{text-decoration:underline;color:#000;}
</style>
	<!-- 标题栏 -->
	<div class="main-title">
		<h2>进店排单列表</h2>
	</div>
	<div class="cf">
		<div class="fl">
		<form action="{:U()}" method="post">
		    预约时间：
			<input type="text" value="{$post_data.yytime_start}" name="Reserve[yytime_start]" class="date" style="width:80px;" onclick="laydate()"> - <input type="text" value="{$post_data.yytime_end}" name="Reserve[yytime_end]" class="date" style="width:80px;" onclick="laydate()">
			<label>线上门市</label>
                    <select name="Reserve[xsjd]" id="Reserve_usherid">
                        <option value="">所有</option>
                        <volist name="xianshang" id="vo">
                        <option value="{$vo.uid}"  <eq name="vo.uid" value="$post_data.xsjd"> selected</eq> >{$vo.nickname}</option>
                        </volist>
                     </select>    
            <label>线下门市</label>
                    <select name="Reserve[xxjd]" id="Reserve_usherid">
                        <option value="">所有</option>
                        <volist name="xianxia" id="vo">
                        <option value="{$vo.uid}"  <eq name="vo.uid" value="$post_data.xxjd"> selected</eq> >{$vo.nickname}</option>
                        </volist>
                     </select>   
			客服工号：<select name="Reserve[kf]" id="Reserve_service_id">
                        <option value="">所有</option>
                        <volist name="kefu" id="vo">
                        <option value="{$vo.uid}" <eq name="vo.uid" value="$post_data.kf"> selected</eq>  >{$vo.nickname}</option>
                        </volist>
                       </select>		 
					 
			<span class="buttons">
                <input type="submit"  id="submit" class="btn" value="开始查询">
            </span>
		</form>	
        </div>

        <!-- 高级搜索 -->
		<div class="search-form fr cf">
			<div class="sleft">
			</div>
		</div>
    </div>
    <!-- 数据列表 -->
    <div class="data-table table-striped">
	<div class="items">
	<table >
    <thead>
        <tr>
		<th class="">日期</th>
		<th class="">邀约时间</th>
		<th class="">顾客姓名</th>
		<th class="">联系电话</th>
		<th class="">渠道</th>
		<th class="">类别</th>
		<th class="">原挖潜人</th>
		<th class="">挖潜部门</th>
		<th class="">挖潜人员</th>
		<th class="">订单状态</th>
		<th class="">线上备注</th>
		<th class="">线下备注</th>
		<th class="">线上门市</th>
		<th class="">线下门市</th>
		<th class="">套系金额</th>
		<th class="">实收金额</th>
		<th class="">操作</th>
		</tr>
    </thead>
    <tbody id="navMenu">
		<notempty name="_list">
		<volist name="_list" id="vo">
		<tr>
			<td>{$vo.yytime|date="Y-m-d",###} (星期{$vo.yytime|date="N",###})</td>
			<!-- <td><?php  $rq = date('H',$vo['yytime']); 
					   switch ($rq){
					   	case 9:
						  echo '10点';
						  break;  
						case 10:
						  echo '10点';
						  break;  
						case 11:
						  echo '10点';
						  break;
						case 12:
						  echo '10点';
						  break;
						case 13:
						  echo '13点';
						  break;
						case 14:
						  echo '13点';
						  break;
						case 15:
						  echo '15点';
						  break;
						case 16:
						  echo '15点';
						  break;
						case 17:
						  echo '17点';
						  break;
						case 18:
						  echo '17点';
						  break;	
						case 19:
						  echo '19点';
						  break;  
						case 20:
						  echo '19点';
						  break; 
						case 21:
						  echo '19点';
						  break; 	
						default:
						  echo '21点以后';		
						} ?>/</td> -->
			<td>{$vo.yytime|date="H:i",###}</td>			
			<td>{$vo.name}</td>
            <td>{$vo.phone}</td>
			<volist name="qudao" id="qd">
				<eq name="qd['uid']" value="$vo['qd']"><td>{$qd.name}</td></eq>
			</volist>
			<volist name="liebei" id="lb">
				<eq name="lb['uid']" value="$vo['lb']"><td>{$lb.name}</td></eq>
			</volist>
			<td>{$vo.waqianren}</td>
			<egt name="vo['wqbm']" value="1" >
			<volist name="wqbm" id="v">
				<eq name="v['id']" value="$vo['wqbm']"><td>{$v.title}</td></eq>
			</volist>
			<else/>
			<td></td>
			</egt>
			<egt  name="vo['wqry']" value="1" >
			<volist name="wqry" id="v">
				<eq name="v['id']" value="$vo['wqry']"><td>{$v.title}</td></eq>
			</volist>
			<else/>
			<td></td>
			</egt>
			<volist name="state" id="ywstate">
				<eq name="ywstate['uid']" value="$vo['ywstate']"><td <if condition="($vo['ywstate'] eq 67) OR ($vo['ywstate'] eq 115) OR ($vo['ywzt'] eq 151) "> class="cjstate"
								<elseif condition="($vo['ywstate'] eq 65) OR ($vo['ywstate'] eq 149) OR ($vo['ywstate'] eq 64) "/> class="lsstate"
								<elseif condition="($vo['ywstate'] eq 153) OR ($vo['ywstate'] eq 66) "/> class="sdstate"
								<elseif condition="($vo['ywstate'] eq 63) OR ($vo['ywstate'] eq 148)"/> class="yyjdstate"
								<else /> class="dqdstate"
							</if> >{$ywstate.name}</td></eq>
			</volist>
			<td><span><a href="javascript:" rel='dropmenu{$vo.id}'>{$vo.bz|msubstr=###,0,5,'utf-8',false}</a></span></td>
				<ul id="dropmenu{$vo.id}" class="dropMenu">
					<span> {$vo.bz}</span>
				</ul>
            <td><span><a href="javascript:" rel='dropmenu1{$vo.id}'>{$vo.xxbz|msubstr=###,0,5,'utf-8',false}</a></span></td>
                <ul id="dropmenu1{$vo.id}" class="dropMenu">
                    <span> {$vo.xxbz}</span>
                </ul>
			<notempty name="vo['xsjd']">
			<volist name="xianshang" id="xsjd">
				<eq name="xsjd['uid']" value="$vo['xsjd']"><td>{$xsjd.nickname}</td></eq>
			</volist>
			<else/>
			<td></td>
			</notempty>
	
			<notempty name="vo['xxjd']">
			<volist name="xianxia" id="xxjd">
					<eq name="xxjd['uid']" value="$vo['xxjd']"><td>{$xxjd.nickname}</td></eq>
			</volist>
			<else/>
			<td></td>
			</notempty>
			<td>{$vo.setmoney}</td>	
			<td>{$vo.money}</td>	
			<td>
				<a class="gengxin" title="查看" href="{:U('cat?id='.$vo['id'])}"><img src="/Public/Admin/images/view.png" alt="查看"></a>
				<a  title="更新 " class="gengxin"  href="{:U('edit',array('id'=>$vo['id']))}"><img src="/Public/Admin/images/update.png" alt="更新"></a>
			</td>	
		</tr>
		</volist>
		<else/>
		<td colspan="12" class="text-center"> aOh! 暂时还没有内容! </td>
		</notempty>
	</tbody>
    </table>
	</div>
	</div>
    <div class="page">
        {$_page}
		<div><span class="rows">本页 <?php echo count($_list); ?> 条记录</span></div>	
    </div>
</block>

<block name="script">
	<script src="__STATIC__/thinkbox/jquery.thinkbox.js"></script>
	<script type='text/javascript' src='__STATIC__/thinkbox/dropdown.js'></script>
	<script type="text/javascript">cssdropdown.startchrome("navMenu")</script> 

	<script type="text/javascript">
    //导航高亮
    highlight_subnav('{:U('Yewu/paidan')}');
	</script>
</block>
